home *** CD-ROM | disk | FTP | other *** search
/ MacTech 1 to 12 / MacTech-vol-1-12.toast / Source / develop™ Technical Journal / develop Issue 25 code / Country Stringing (Newton) / Run Time Strings / Project Data < prev    next >
Encoding:
Text File  |  1995-12-15  |  1.7 KB  |  64 lines  |  [TEXT/ttxt]

  1. // Copyright ©1994 Apple Computer, Inc.
  2.  
  3. // NOTE: to change the default language,
  4. // go to the Project Settings menu item
  5. // and change the language from English to
  6. // either French or German
  7.  
  8.  
  9.  
  10. // create the languages frame, either by text or by rsrc
  11. constant kFromText := nil ;
  12.  
  13. // create the kLanguagesArray constant for the languages
  14. // textfile method requires only as many languages as
  15. // actual text files.
  16. // resource method requires 5 element array.
  17. DefConst('kLanguagesArray, 
  18. call func(isText)
  19.     if isText then
  20.         '[English, French, German] ;
  21.     else
  22.         '[English, French, German, Other1, Other2]
  23. with (kFromText));
  24.  
  25. if kFromText then
  26.     DefConst('kLangFrame,
  27.         CreateLanguagesFrameFromText(HOME&"StringsCommon.f", kLanguagesArray)) ;
  28. else
  29.     DefConst('kLangFrame,
  30.         CreateLanguagesFrameFromRsrc(HOME & "strings.rsrc", kLanguagesArray)) ;
  31.  
  32. SetLocalizationFrame(kLangFrame) ;
  33.  
  34. // define a constant for the english language frame
  35. DefConst('kStrings, kLangFrame.English) ;
  36.  
  37. // Application constants ---------------------
  38.  
  39. // only way to replace the application name with NTK 1.5+
  40. ReplaceObject(kAppName, LocObj(kStrings.AppStrings.AppName, 'AppStrings.AppName)) ;
  41.  
  42. constant kMaxApplicationWidth := 240 ;
  43. constant kMaxApplicationHeight := 336 ;
  44.  
  45.  
  46. // THIS IS A 2.0 ONLY installScript
  47. installScript := func(partFrame)
  48. begin
  49.     // change the extras drawer name
  50.     AddDeferredCall(func() GetRoot().extrasDrawer:SetExtrasInfo(kAppSymbol,
  51.         {text: LocObj(kStrings.AppStrings.ExtrasName, 'AppStrings.ExtrasName)}),
  52.         '[]);
  53. end;
  54.  
  55.  
  56. /* 1.x INSTALL SCRIPT
  57. installScript := func(partFrame)
  58. begin
  59.     AddDeferredAction(func() call kSetExtrasInfo with (kAppSymbol,
  60.         {text: LocObj(kStrings.AppStrings.ExtrasName, 'AppStrings.ExtrasName)}),
  61.         '[]);
  62. end;
  63. */
  64.